﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TEAA
{
    class RecordIDComparator : IComparer<RecordID>
    {

        public int Compare(RecordID x, RecordID y)
        {
            if (x.page == y.page)
            {
                if (x.slot == y.slot)
                    return 0;
                if (x.slot < y.slot)
                    return -1;
                return 1;
            }
            else
            {
                if (x.page < y.page)
                    return -1;
                else
                    return 1;
            }

                
        }
    }
}
